package com.字节缓冲流;

import lombok.SneakyThrows;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;

public class BufferInputStreamDemo {
    @SneakyThrows
    public static void main(String[] args) {
        BufferedInputStream bufferedInputStream = new BufferedInputStream(new FileInputStream("hello.txt"));

        byte[] bytes = new byte[1024];
        int by;
        while ((by=bufferedInputStream.read(bytes))!=-1){
            System.out.println(new String(bytes,0,by));
        }
        bufferedInputStream.close();
    }
    /*
jdbc.driver=com.mysql.cj.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/mybatis?serverTimezone=UTC
jdbc.username=root
jdbc.password=111111
     */
}
